{extend name="public/layout" /}
{block name="head_css"}
    <link rel="stylesheet" href="/static/home/css/index.css?v={$version}">
    <link rel="stylesheet" href="/static/home/css/list.css?v={$version}">
{/block}
{block name="main"}
    <div class="content-area middle-content">
        <div class="tab-wrapper inline-box">
            <div class="tab-title-line inline-box inline-block">
                <a href="{:url('index',array('order'=>1))}" class="tab-item {if $order eq '1'}chosen{/if} inline-block">点赞最多</a>
                <a href="{:url('index',array('order'=>'2'))}" class="tab-item {if $order eq '2'}chosen{/if} inline-block">最新发布</a>
                <a href="{:url('index',array('order'=>'3'))}" class="tab-item {if $order eq '3'}chosen{/if} inline-block">浏览最多</a>
            </div>
            <div class="jump-btn inline-block">
                <a href="{:url('add')}">立即发布&gt;&gt;&gt;</a>
            </div>
        </div>

        <div class="content-area">
            <div class="wrap-block inline-box" >
                {foreach name="list" item="item"}
                    <div  onclick="to_url('{:url('detail',array('id'=>$item.id))}')"  class="big-shotcut inline-block video" style="background-image: url('{$item.logo}');width: 24%;padding-top: 30%">
                        <div class="btm-box inline-box">
                            <div class="icon like inline-block"></div>
                            <div class="words first inline-block">{$item.like_num}个赞</div>
                            <div class="icon pinglun inline-block"></div>
                            <div class="words inline-block">{$item.comment_num}条评论</div>
                        </div>
                    </div>
                {/foreach}
            </div>
        </div>
        <div class="page-box">{$list->render()}</div>
    </div>
{/block}
{block name="script"}
    <script>
        function to_url(url){
            window.location.href = url;
        }
    </script>
{/block}